package com.suray.system.run.seer.type;

public enum SeerBlockType {
    GET_CARGO(1, "取货"),
    PUT_CARGO(2, "放货"),
    ;

    int value;
    String des;

    SeerBlockType(int value, String des) {
        this.value = value;
        this.des = des;
    }

    public int getValue() {
        return value;
    }

    public static SeerBlockType parseType(int value) {
        for (SeerBlockType type : SeerBlockType.values()) {
            if (type.value == value) {
                return type;
            }
        }

        throw new RuntimeException("Block 类型错误");
    }

    @Override
    public String toString() {
        return des;
    }
}
